package org.noote.libs.computervision.function;

import org.noote.libs.computervision.buffer.Buffer8I;

public class Blur {

	static float fConvolutionKernel3x3_Low[]=
	{
		1,  3, 1,
		3, 16, 3,
		1,  3, 1
	};
	static float fConvolutionKernel3x3_High[]=
	{
		 1, -1,  1,
		-1,  4, -1,
		 1, -1,  1
	};

	static public boolean doLow3x3(Buffer8I buffer)
	{
		return buffer.applyKernel3x3(fConvolutionKernel3x3_Low, 1.0f/32.0f, 0.0f);
	}
	static public boolean doHigh3x3(Buffer8I buffer)
	{
		return buffer.applyKernel3x3(fConvolutionKernel3x3_High, 1.0f/4.0f, 0.0f);
	}
}
